package com.m1905hd.service

import com.m1905hd.common.util.Page
import com.mongodb.BasicDBObject
import com.mongodb.DBObject

/**
 * Created with IDEA
 * User:hxh
 * Date:16/4/18
 * Time:下午2:14
 */
interface BaseMongoService {
    Page list(BasicDBObject query, BasicDBObject sort, BasicDBObject returnFiled, int page, int size);

    DBObject findOne(Object _id);

    boolean update(Object id, DBObject object);

    List<DBObject> list(List<Integer> ids);

    boolean del(Object id);

    Integer getCurrentId();

    boolean save(DBObject object);

    def count(BasicDBObject query);

    List find(BasicDBObject query)
}